<?php

App::uses('AppModel', 'Model');

/**
 * Content Model
 *
 */
class Content extends AppModel {

    var $actsAs = array('Translate' => array(
            'pageName' => 'pageNameTranslation',
            'content' => 'contentTranslation'
    ));
    
     public $validate = array(
        'pageName' => array( 
            'pathname' => array( 
            'rule' => array('notempty'), 
            'message' => 'Please enter a page name'), 
       ),
         'description' => array( 
            'pathname' => array( 
            'rule' => array('notempty'), 
            'message' => 'Please enter a description'), 
       ),
        'path' => array( 
            'pathname' => array( 
            'rule' => array('notempty'), 
            'message' => 'Please enter a path'), 
       ) 
    ); 

    /**
     * Display field
     *
     * @var string
     */
    public $displayField = 'pageName';
    public $hasOne = array(
        'Menu' => array(
            'className' => 'Menu',
            'foreignKey' => 'id',
            'conditions' => '',
            'fields' => '',
            'order' => ''
        )
    );

}
